//
//  TogetherCellButton.m
//  Together_iOS
//
//  Created by applex on 14-3-1.
//  Copyright (c) 2014年 QIU Shuang. All rights reserved.
//

#import "TogetherCellButton.h"

@interface TogetherCellButton ()

@property (nonatomic, strong) UILabel *textLabel;
@property (nonatomic, strong) UIImageView *iconImageView;

@end

@implementation TogetherCellButton

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 10.0f, 26.0f, 24.0f)];
        self.arrowImageView = [[UIImageView alloc] initWithFrame:CGRectMake(215.0f, 16.0f, 11.0f, 13.0f)];
        self.arrowImageView.image = [UIImage imageNamed:@"icon_sanjiao"];
        self.textLabel = [[UILabel alloc] initWithFrame:CGRectMake(43.0f, 16.0f, 140.0f, 15.0f)];
        self.textLabel.textColor = [UIColor colorWithWhite:147./255. alpha:1.0];
        self.textLabel.textAlignment = NSTextAlignmentLeft;
        self.textLabel.font = [UIFont systemFontOfSize:14.0f];
        
        [self addSubview:_iconImageView];
        [self addSubview:_arrowImageView];
        [self addSubview:_textLabel];
    }
    return self;
}


- (void)setDesString:(NSString *)desString {
    _desString = desString;
    self.textLabel.text = desString;
}


- (void)setIconImage:(UIImage *)iconImage {
    _iconImage = iconImage;
    self.iconImageView.image = iconImage;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
